
(recode-form->io-form 'int32 4)

(map bytes-required-to-encode-unsigned-integer
     '(0 1 255 256 65535 65536 16777215 16777216)) ; => (0 1 1 2 2 3 3 4)

(bytes-required-to-encode-unsigned-integer -1)   ; =^ ERROR

(map bytes-required-to-encode-signed-integer
     '(0 1 127 128 32767 32768 8388607 8388608)) ; => (1 1 1 2 2 3 3 4)

(map bytes-required-to-encode-signed-integer
     '(0 -1 -128 -129 -32768 -32769 -8388608 -8388609)) ; => (1 1 1 2 2 3 3 4)

(integer->bit-pattern 27 8)		; => (#f #f #f #t #t #f #t #t)

(bit-pattern->integer 
 '(#f #f #f #t #t #f #t #t))		; => 27

(integer->bit-pattern -28 8)		; => (#t #t #t #f #f #t #f #f)

;; In two's complement notation the least negative number, -1, is what
;; would have been the most positive number, ie. all bits set.

(list
 (integer->bit-pattern -1 8)
 (integer->bit-pattern 255 8))		
;; => ((#t #t #t #t #t #t #t #t) (#t #t #t #t #t #t #t #t))

(bit-pattern->integer 
 '(#t #t #t #f #f #t #f #f))		; => 228

(byte-list->integer '(1 1 1))		; => 65793

(integer->byte-list 65793 3)		; => (1 1 1)

(byte-list->integer '(2 5 27))		; => 132379

(integer->byte-list 132379 3)		; => (2 5 27)

(map integer-length '(2 4 8 16 32))	; => (2 3 4 5 6)

(decode/scan-pascal-string
 (encode-pascal-string "test-string"))	; => "test-string"

(decode/scan-c-string
 (encode-c-string "test-string"))	; => "test-string"
